#ifndef _NODE_H_
#define _NODE_H_
#include "Public.h"
const int NULL = 0;

template <typename ElemType>
class Node {
	typedef Node<ElemType> *Position;
public:
	Node(); 
	~Node();
	ElemType getData();
	Status setData(const ElemType key);
	Position getNext() {
		if (next == NULL) {
			return (Node<ElemType> *) 0;
		}
		return next;
	}
	Status setNext(Node<ElemType> *const pointer) ;

private:
	ElemType data;
	Position next;
};


template <typename ElemType>
Node<ElemType>::Node():data(0),next(NULL){}

template <typename ElemType>
Node<ElemType>::~Node(){}

template <typename ElemType>
ElemType Node<ElemType>::getData(){
	return data;
}

template <typename ElemType>
Status Node<ElemType>::setData(const ElemType key){
		data = key;
		return OK;
}

template <typename ElemType>
Status Node<ElemType>::setNext(Node<ElemType> *const pointer){
		next = pointer;
		return OK;
}

#endif
